
<div class="widget widget-category">
    <h3 class="widget-title">分类</h3>
    <ul>
        {% for category in category_list %}
        <li>
            <a href="{% url 'blog:category' category.id %}">{{ category.name }} <span class="post-count">({{ category.num_posts }})</span></a>
        </li>
        {% empty %}
        暂无分类！
        {% endfor %}
    </ul>

</div>